#pragma once

#include "Parser.h"

class Calc
{
	FloatParser parser;

	class Registry: public FloatParser::Register
	{
	public:
		virtual float getVariable(StringRef variable);
		// The signature of this function will be likely to change to support multiple parameters.
		virtual float applyFunction(StringRef functionName, float parameter);
	} registry;

public:
	Calc();
	~Calc();

	StringRef calculate(StringRef expr);
        StringRef calculateThrowError(StringRef expr) throw(StringRef);
};
